<extend name="Public/base" />
<block name="content">
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a href="{:U('Index/index')}" title="首页" class="tip-bottom"><i class="icon-home"></i> 首页</a> 
			<a href="{:U('/Article/category')}" class="current">{$meta_title}</a>
			<present name="data_up"><a href="{:U('/Article/category/pid/'.$data_up['ask_category_id'])}">[ {$data_up.ask_category_name} ] </a></present><a>
			<present name="data">[ {$data.ask_category_name} ]</present></a>
		</div>
	</div>
	<div class="container-fluid">
		<br>
		<a class="btn btn-info" href="{:U('addCategory',array('pid'=>I('get.pid',0)))}">新增</a>
		<button class="btn btn-warning ajax-post" url="{:U('Article/changeCategory?method=resume')}" target-form="ids">启用</button>
		<button class="btn btn-success ajax-post" url="{:U('Article/changeCategory?method=forbid')}" target-form="ids">禁用</button>
		<button class="confirm btn btn-danger ajax-post" url="{:U('Article/changeCategory?method=delete')}" target-form="ids">删除</button>
		<div class="search-form fr cf row-fluid" style="width:800px;">
			<span class=" pull-right">
				<input type="text" name="search_text" class="search-input" value="{:htmlspecialchars(I('search_text'))}" placeholder="请输入文章分类" style="margin-bottom:0;"><button class="btn btn-info" id="search_button" url="{:U('Article/category')}"><i class="icon-search icon-white"></i></button>
			    <input type="hidden" name='pid' value="{:I('get.pid',0)}">
			</span>
		</div>
	</div>
	<div class="container-fluid">	
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-content ">
						<form id="export-form" method="post" action="">
							<table id="config_table" class="table table-bordered table-striped with-check">
								<thead>
									<tr>
										<th width="5%"  class="row-selected">
				                            <input class="checkbox check-all" type="checkbox">
				                        </th>
				                        <th width="5%" class="taskStatus">ID</th>
				                        <th width="17%" class="taskStatus">文章分类名称</th>
				                        <th width="15%" class="taskStatus">标题</th>
				                        <th width="15%" class="taskStatus">关键字</th>
				                        <th width="15%" class="taskStatus">描述</th>
				                        <th width="10%" class="taskStatus">状态</th>
				                        <th width="20%" class="taskStatus">操作</th>
									</tr>
								</thead>
								<tbody>
									<notempty name="_list">
						                <volist name="_list" id="menu">
						                    <tr>
						                        <td><input class="ids row-selected" type="checkbox" name="id[]" value="{$menu.ask_category_id}" class="ids" /></td>
						                        <td class="taskStatus">{$i}</td>
						                        <td class="taskStatus">
							                        <if condition="(int)I('pid',0) == 0">
							                            <a href="{:U('Article/category?pid='.$menu['ask_category_id'])}">{$menu.ask_category_name|htmlspecialchars}</a>
							                        <else/>
							                        	{$menu.ask_category_name|htmlspecialchars}
							                        </if>
						                        </td>
						                        <td class="taskStatus">{$menu.ask_category_title|htmlspecialchars|msubstr=###,0,10}</td>
						                        <td class="taskStatus">{$menu.ask_category_keyword|htmlspecialchars|msubstr=###,0,10}</td>
						                        <td class="taskStatus">{$menu.ask_category_description|htmlspecialchars|msubstr=###,0,10}</td>
						                        <td class="taskStatus">
						                            <if condition="$menu['status'] eq 1">启用<else/>已禁用</if>
						                        </td>
						                        <td class="taskStatus">
						                            <a title="编辑" href="{:U('editCategory?id='.$menu['ask_category_id'])}"><i class="icon-pencil"></i> 编辑</a> 　
						                            <a class="confirm ajax-get" title="删除" href="{:U('changeCategory',array('id'=>$menu['ask_category_id'],'method'=>'delete'))}"><i class="icon-remove"></i> 删除</a>
						                        </td>
						                    </tr>
						                </volist>
									<else/>
										<tr>
											<td colspan="10" class="taskStatus"> Oh! 暂时还没有内容! </td>
										</tr>
									</notempty>
								</tbody>
							</table>
							<div class="dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_full_numbers" id="DataTables_Table_0_paginate">
								{$_page}
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">

highlight_subnav("{:U('Article/category')}");//导航高亮



</script>
</block>


